package be.gnx.logging4eclipse.perspective.view;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.part.ViewPart;

import be.gnx.logging4eclipse.log4j.Log4JListener;
import be.gnx.logging4eclipse.perspective.widget.LoggingEntriesWidget;

public class LoggingEntriesView extends ViewPart {

  private LoggingEntriesWidget loggingEntriesWidget;

  public static void addLoggingEntriesEvents(LoggingEntriesEvents loggingEntriesEvents) {
    LoggingEntriesWidget.addLoggingEntriesEvents(loggingEntriesEvents);
  }

  @Override
  public void createPartControl(Composite parent) {
    loggingEntriesWidget = new LoggingEntriesWidget(parent, SWT.NONE);
    Log4JListener.getInstance().addLog4JListenerEvents(loggingEntriesWidget);
  }

  @Override
  public void setFocus() {
  }

}
